﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Demo1
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RangeValidator2.MaximumValue = DateTime.Now.ToShortDateString();
        }

        protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
        {
            if (args.Value == "admin")
            {
                args.IsValid = false;
            }
            else
            {
                args.IsValid = true;
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            if (IsValid == true)
            {
                Literal1.Text = $"姓名:{TextBox1.Text} 密码:我答应过主人要保守主人的秘密的,哼\t\t\t\t\t\t\t年龄:{TextBox4.Text}\t\t\t\t\t\t\t出生日期:{TextBox5.Text}\t\t\t\t\t\t\t毕业时间:{TextBox6.Text}\t\t\t\t\t\t\t邮箱:{TextBox7.Text}\t\t\t\t\t\t\t注册成功!主人太棒了!快去登录吧,小奴给主人准备了一个惊喜,嘿嘿~\t\t\t\t\t\t\t<a href='/WebForm2.aspx'>邓夏晖</a>";
            }
           
        }
    }
}